package volumes

import (
	"echotest/hllyun/driver/db"
	"fmt"
)

func GetAllVolumes1() (a string) {
	a = "aaa"
	fmt.Println(a)
	db.Test()
	return
}

func GetAllVolumes2() {
	m := make(map[int]string)
	m[1] = "one"

	fmt.Println(m)
}

type Volume struct {
	volume_uuid, volume_name, volume_type string
	is_start                              int
}

type templet struct {
	templet_uuid, templet_name string
	is_start                   int
}

func Structtest() {
	vol := Volume{
		volume_uuid: "abcdefg-abc",
		volume_name: "test_volume",
		volume_type: "ssd",
		is_start:    1,
	}

	tem := templet{
		templet_uuid: "templet-abc",
		templet_name: "templet_test",
		is_start:     1,
	}

	// 打印对象
	fmt.Println("vol:", vol)
	fmt.Println("tem", tem)

	// 打印对象属性
	fmt.Println("vol_name", vol.volume_name)
	fmt.Println("templet_name", tem.templet_name)
}

func (vol Volume) Create_volume() int {
	fmt.Println("volume ", vol.volume_name, "had be created!!!")
	return 1
}
